import request from '@/utils/request.js'
// 获取分类id对应的属性列表
export const getAttrListApi = (id, sel) => request(`/categories/${id}/attributes`, 'get', {
    sel
})

// 修改参数
export const editAttrApi = data => request(`/categories/${data.id}/attributes/${data.attrId}`, 'put', data)

//删除参数
export const deleteAttrApi = (cateId) => request(`/categories/${cateId}/attributes/${cateId}`, 'delete')

// 新增参数的API函数
export const addAttrApi = async (data) => request(`/categories/${data.cat_id}/attributes`, 'post', data);
